{{csrf_field()}}
<div class="layui-form-item">
    <label for="" class="layui-form-label">用户帐号：</label>
    <div class="layui-input-inline">
        <input type="text" name="name" value="{{ $dao->name ?? old('name') }}" lay-verify="required" placeholder="请输入用户名" class="layui-input" >
    </div>
</div>

<div class="layui-form-item">
    <label for="" class="layui-form-label">姓名：</label>
    <div class="layui-input-inline">
        <input type="text" name="real_name" value="{{ $dao->real_name ?? old('real_name') }}" lay-verify="required" placeholder="请输入姓名" class="layui-input" >
    </div>
</div>

<div class="layui-form-item">
    <label for="" class="layui-form-label">所属角色：</label>
    <div class="layui-input-inline">
        <select name="role_id" id="">
            <option value=""> 请选择角色 </option>
            @foreach($role as $key=>$val)
                @if(isset($dao->role_id) && $dao->role_id==$key)
                    <option value="{{$key}}" selected > {{$val}} </option>
                @else
                    <option value="{{$key}}"> {{$val}}</option>
                @endif
            @endforeach
        </select>
    </div>
</div>

<div class="layui-form-item">
    <label for="" class="layui-form-label">密码：</label>
    <div class="layui-input-inline">
        <input type="password" name="password" placeholder="请输入密码" class="layui-input">
    </div>
</div>

<div class="layui-form-item">
    <label for="" class="layui-form-label">确认密码：</label>
    <div class="layui-input-inline">
        <input type="password" name="password_confirmation" placeholder="请输入密码" class="layui-input">
    </div>
</div>

<div class="layui-form-item">
    <div class="layui-input-block">
        <button type="submit" class="layui-btn" lay-submit="" lay-filter="postForm">确 认</button>
        <a  class="layui-btn" href="javascript:void(0)" id="close" >关 闭</a>
    </div>
</div>